<?php
header('Content-Type:text/html; charset=utf-8');
require_once 'dbClasses'.DIRECTORY_SEPARATOR.'config.php';
require_once 'dbClasses'.DIRECTORY_SEPARATOR.'dbConn.php';
$db = new dbConn();
$id = $_GET['id'];
$db->sql = "SELECT * FROM admin WHERE id = ".$id;
$userInfo = $db->doResult2();
if($userInfo['isActive']==1){
	$db->sql="UPDATE admin SET isActive=0 WHERE id = ".$id;
	$db->doExecute();
	echo 0;
}else{
	$db->sql="UPDATE admin SET isActive=1 WHERE id = ".$id;
	$db->doExecute();
	echo 1;
}
?>